package com.qf.product.controller;

import com.qf.product.service.AreaService;
import com.qf.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 行政区划表 前端控制器
 * </p>
 *
 * @author wxh
 * @since 2023-10-26
 */
@RestController
@RequestMapping("/area")
@CrossOrigin
public class AreaController {
    @Autowired
    private AreaService areaService;

    /**
     * 查询省市区接口
     * @return
     */
    @PreAuthorize("hasAuthority('产品添加')")
    @PostMapping("all")
    public R all(){
        R r = areaService.selectAll();
        return r;
    }




}
